package com.finalProject;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * author: Jimmmy Smile
 * date: 2021-06-09 22:18::18
 * positioan: com.finalProject
 * e-mail:jimmysmileltl@163.com
 **/
class DBHelper_Income  extends SQLiteOpenHelper {

    private static final int VERSION = 1;
    private static final String DB_NAME = "incomeTop100.db";
    public static final String TB_NAME = "tb_income";


    public DBHelper_Income(Context context, String name, SQLiteDatabase.CursorFactory factory,int version) {
        super(context, name, factory, version);
    }
    public DBHelper_Income(Context context) {
        super(context,DB_NAME,null,VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE "+TB_NAME+"(ID INTEGER PRIMARY KEY AUTOINCREMENT,rank TEXT,city TEXT,income TEXT)");
    }

    @Override
    public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
        // TODO Auto-generated method stub
    }

}
